@layout("/common/_container.html"){
<style>
    .pay_list_c1 {
        display: inline-block;
        width: 15px;
        height: 15px;
        background: #DCDCDC;
        border: 1px solid #535353;
        border-radius: 5px;
        vertical-align: middle
    }
    .radioclass {
        opacity: 0;
        cursor: pointer;
        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
        filter: alpha(opacity=0);
    }
</style>

<div style="display: none">
    <input type="hidden" id="customerIdValue" value="${customerId}">
</div>

<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div id="tcBox" class="clearfix">
            <label><input name="customerStatus" type="radio" value="新客首次" />新客首次 </label>
            <label><input name="customerStatus" type="radio" value="新客二次" />新客二次 </label>
            <label><input name="customerStatus" type="radio" value="复诊" />复诊 </label>
            <label><input name="customerStatus" type="radio" value="老客" />老客 </label>
        </div>
        <br>
        <div>
            备注：<input id="remarks" name="remarks" type="text" style="width:50%;">
        </div>
        <div>
            <button class="btn" type="button" id="submission">提交</button>
        </div>
    </div>
</div>


<script>

    $("#submission").click(function () {
        var customerStatus = $('input:radio[name="customerStatus"]:checked').val();
        var customerId = $("#customerIdValue").val();
        var remarks = $("#remarks").val();
        if(remarks==null||remarks==""){
            alert("请填写备注！");
            return;
        }
        $.ajax({
            url: Feng.ctxPath +"/customer/choiceCustomerStatus",
            type:'POST',
            data:{
                customerId:customerId,
                remarks:remarks,
                customerStatus:customerStatus
            },
            success:function (data) {
                Feng.success("保存成功!");
                window.parent.Consultant.table.refresh();
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            },
            error:function (data) {
                alert("系统故障！")
            }
        })
    })

</script>
@}
